﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Smartee.RichText
{
    public enum Justification { Nutral, Left, Right, Center, Full }
    public enum TextDirection { LeftToRight, RightToLeft }

    public class Paragraph : Container
    {
        protected List<Content> _content = new List<Content>();

        public Justification Justification { get; private set; }
        public TextDirection TextDirection { get; private set; }

        public Paragraph(Justification justification, TextDirection textDirection)
        {
            Justification = justification;
            TextDirection = textDirection;
        }

        public void Add(Content newItem) { _content.Add(newItem); }

        public override void Accept(IVisitor visitor)
        {
            visitor.StartVisit(this);
            foreach (Content item in _content)
                item.Accept(visitor);
            visitor.EndVisit(this);
        }
    }
}
